package com.woniu.uitl;


import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * 提供当前spring上下文对象
 */
@Component
public class ApplicationContextHolder {

    private static ApplicationContext APPLICATION_CONTEXT;

    public ApplicationContextHolder(ApplicationContext applicationContext){
        APPLICATION_CONTEXT=applicationContext;
    }
    public static ApplicationContext getApplicationContext(){
        return APPLICATION_CONTEXT;
    }

}
